# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-unittest2
_pkgname=unittest2
pkgver=1.1.0
pkgrel=1
pkgdesc='The new features in unittest backported to Python 2.4+.'
url='https://pypi.org/project/unittest2/#files'
arch=('any')
license=('BSD')
depends=('python2' 'python2-six' 'python2-traceback2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('3fba15728905f437767416ab4fd3573d3fb2319486ef84c52a9fa930ea84aa1f2ae29d6f58993e3509083625790e17b1ef8d9ac5de0e166c254897a3e7a202fa')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

